package com.jh.readme.iu.activity.home;

import com.jh.readme.R;
import com.jh.readme.iu.activity.setting.SettingActivity;
import com.jh.tools.common.phone.ToActivityUtil;
import com.umeng.fb.FeedbackAgent;

/**
 * Created by niejiahuan on 2016/5/31.
 * 主界面控制层
 */
public class HomePresenter extends HomeContract.Presenter {
    @Override
    public void onStart() {

    }

    @Override
    public void switchUiById(int id) {
        switch (id){
            case R.id.nav_camera:
                break;
            case R.id.nav_gallery:
                break;
            case R.id.nav_slideshow:
                break;
            case R.id.nav_manage:
                break;
            case R.id.nav_share:
                break;
            case R.id.nav_send:
                break;
        }
    }

    @Override
    public void onOptionsItemSelected(int id) {
        switch (id){
            case R.id.action_settings://系统设置
                ToActivityUtil.getInstance().toNextActivity(mContext, SettingActivity.class);
                break;
            case R.id.action_feedback://意见反馈
                FeedbackAgent agent = new FeedbackAgent(mContext);
                agent.startFeedbackActivity();
                agent.sync();
                break;
        }
    }
}
